An electronic camera in which an image signal is converted into digital image data is popularized. The image signal is obtained by taking a subject image with a solid-state image sensor of a CCD and so forth. The digital image data is stored in a recording medium of a built-in memory, a memory card and so forth. Some of the electronic cameras are the so-called interchangeable lens camera in which a lens unit having an imaging optical system and a solid-state image sensor is detachably attached to a camera body (see Japanese Patent Laid-Open Publication No. 2000-50130).
By the way, many of the digital cameras currently put on the market calculate a focus evaluation value, which represents sharpness of a subject image, from the image data. This kind of the electronic camera is equipped with an autofocus (AF) function for automatically performing focus adjustment by using a method in which a position of the maximum focus evaluation value is defined as a focal position.
With respect to the electronic camera adopting a TTL phase difference detection method as the method for autofocus, there is a proposed method in which a color temperature of subject light is measured to correct an error of focus detection to be caused by color aberration occurring in accordance with wavelength components of the subject light (see Japanese Patent Laid-Open Publication No. 2000-266988).
Meanwhile, some of the electronic cameras equipped with the AF function are provided with an auxiliary-light emitting device for emitting the auxiliary light to a subject in order to enable the AF function in a dark place and so forth (see Japanese Patent Laid-Open Publication No. 2003-287674). The camera described in the Publication No. 2003-287674 uses a green LED as a light source of the auxiliary-light emitting device. The green LED has spectral characteristics resembling visibility characteristics.
As described in the above-noted Publication No. 2000-266988, it is known that the error of focus detection is caused by the color aberration occurring in accordance with the wavelength components of the subject light. When the auxiliary light is emitted to the subject, the color temperature of the subject light is strongly affected by the auxiliary light. Thus, the error of the focus detection is likely to be caused. In other words, when only the light of the green LED is used as the auxiliary light such as the camera described in the Publication No. 2003-287674, it is necessary to perform correction in accordance with the spectral characteristics.
In case of the unicolor auxiliary light, if the focus evaluation value is calculated by using the whole data of three colors of R, G and B without correcting the color aberration, the colors except for the color of the auxiliary light do not contribute to the calculation and are likely to affect a result of the calculation as noise. Thus, it is preferable that the spectral characteristics of the auxiliary light coincide with spectral characteristics of the color of the data used for calculating the focus evaluation value.
However, as to the electronic camera described in the Publication No. 2000-50130, although the auxiliary-light emitting device of the camera body is controlled by a controller of an imaging unit (lens unit), it is impossible to judge the spectral characteristics of the auxiliary light at the lens unit side. Consequently, even if the auxiliary light has the sole color, there is no choice for using the data of three colors of R, G and B in calculating the focus evaluation value. Thus, there arises a problem in that the error of the focus detection is likely to be caused.